	<?php 
		$cateModel = new \Common\Model\Cate;
		$topCate= $cateModel->where("pid=0")->get();
//		p($topCate);
	 ?>
	
	<!--头部条开始-->
	<div id="header">
		<div class="center">
			<!--左部分开始-->
			<ul class="left">
				<li class="gi1">
					<a href="javascript:;">社区</a>
				</li>
				<li class="gi2">
					<a href="javascript:;">ColorOS</a>
				</li>
				<li class="gi3">
					<a href="javascript:;">软件商店</a>
				</li>
				<li class="gi4">
					<a href="javascript:;">手机助手</a>
				</li>
				<li class="gi5">
					<a href="javascript:;">云服务</a>
				</li>
			</ul>
			<!--左部分结束-->
			
			<!--右部分开始-->
			<ul class="right">
				<li class="gi1">
                    <?php if(isset($_SESSION['username'])){?>
                
					    <a href="<?php echo U('User/index')?>"><?php echo $_SESSION['username']?></a>
                    <?php }else{?>
                        <a href="<?php echo U('Login/index')?>">登录</a>
                    
               <?php }?>
				</li>
				<li class="gi2">
                    <?php if(isset($_SESSION['username'])){?>
                
                    <a href="<?php echo U('Login/out')?>">退出</a>
                    <?php }else{?>
					<a href="<?php echo U('Login/zhuce')?>">注册</a>
                    
               <?php }?>
				</li>
				
			</ul>
		</div>
	</div>
	<!--头部条结束-->
	
	<!--导航区域开始-->
	<div id="dh">
		<div id="wrapper">
		<div id="logo">
			<img src="./Public/Home/images/oppo_logo.png"/>
		</div>
		<div class="shop">

			<span class="text"><a href="<?php echo U('Cart/index')?>">购物车</a></span>
			<span class="icon"></span>
			<span class="num"> 
				<span class="shop-count">
					0
				</span>
			</span>
		</div>
		<ul class="nav">
				<li class="gi1">
					<a href="index.php"  <?php if('User'=='Index'){?>
                style="color:#009B72;"
               <?php }?>>首页</a>
				</li>
			<?php foreach ($topCate as $v){?>
				<li class="gi2" >
					<a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>" <?php if(Q('get.cid')==$v['cid']){?>
                style="color:#009B72;"
               <?php }?>><?php echo $v['cname']?></a>
				</li>
			<?php }?>
	</div>
	</div>